import request from '~/utils/request'

export default {
  createOrder(courseId) {
    return request({
      //baseURL: 'http://localhost:8007',
      url: `/api/order/auth/save/${courseId}`,
      method: 'post'
    })
  },

  getById(orderId) {
    return request({
      //baseURL: 'http://localhost:8007',
      url: `/api/order/auth/get/${orderId}`,
      method: 'get'
    })
  },

  isBuy(courseId) {
    return request({
      //baseURL: 'http://localhost:8007',
      url: `/api/order/auth/isBuy/${courseId}`,
      method: 'get'
    })
  },

  getList() {
    return request({
      //baseURL: 'http://localhost:8007',
      url: '/api/order/auth/list',
      method: 'get'
    })
  },

  removeById(orderId) {
    return request({
      //baseURL: 'http://localhost:8007',
      url: `/api/order/auth/remove/${orderId}`,
      method: 'delete'
    })
  },

  // queryPayStatus(orderNo) {
  //   return request({
  //     baseURL: 'http://localhost:8007',
  //     url: `/api/order/auth/queryOrderStatus/${orderNo}`,
  //     method: 'get'
  //   })
  // },

  queryPayStatus(orderNo) {
    return request({
      //baseURL: 'http://localhost:8007',
      url: `/api/order/auth/queryPayStatus/${orderNo}`,
      method: 'get'
    })
  }


}